package com.dao;

import com.entity.Praise;
import com.vo.CommentVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.RequestParam;

@Repository
public interface PraiseMapper {
    //添加点赞记录 李奇洲
    public int insertPraise(@Param("p") Praise praise);
    //查询praise_count  返回CommentVo
    public CommentVo selectPraiseByUserIdAndCommentId(Integer commentID);
    //李奇洲
    //查询Praise 返回Praise对象 判断该点赞是否存在 根据CommentId 和UserId
    //只在Dao层用到
    public Praise selectPraiseByCommentIdAndUserId(@Param("commentId") Integer commentId,@Param("userId") Integer userId);
    //李奇洲 删除点赞记录
    public int deletePraise(@Param("commentId") Integer commentId,@Param("userId") Integer userId);

}
